<?php

/**
 * MeritsChar form base class.
 *
 * @method MeritsChar getObject() Returns the current form's model object
 *
 * @package    rpgcom
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseMeritsCharForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'idCharacter' => new sfWidgetFormPropelChoice(array('model' => 'Character', 'add_empty' => false)),
      'idFlaw'      => new sfWidgetFormPropelChoice(array('model' => 'Flaws', 'add_empty' => false)),
      'id'          => new sfWidgetFormInputHidden(),
    ));

    $this->setValidators(array(
      'idCharacter' => new sfValidatorPropelChoice(array('model' => 'Character', 'column' => 'idCharacter')),
      'idFlaw'      => new sfValidatorPropelChoice(array('model' => 'Flaws', 'column' => 'idFlaw')),
      'id'          => new sfValidatorPropelChoice(array('model' => 'MeritsChar', 'column' => 'id', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('merits_char[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'MeritsChar';
  }


}
